package com.clkj.xiuzheng.dao.shangcheng;

import com.clkj.xiuzheng.pojo.shangcheng.Identity;
import com.clkj.xiuzheng.pojo.shangcheng.IdentityInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.MySqlMapper;

import java.util.List;

@Repository
public interface ScIdentityinfoMapper extends Mapper<IdentityInfo> , MySqlMapper<IdentityInfo> {
    @Select("SELECT t.identity_id,t.identity_name,m.menu_id,m.menu_name FROM t_xz_identity t left JOIN t_xz_identityInfo i on t.identity_id=i.identity_id LEFT JOIN t_xz_menu m on i.menu_id =m.menu_id where t.identity_id = #{identityId}")
    List<Identity> getIdentityMenuById(@Param("identityId") Integer identityId);
}
